/**
 * Created by yuhongdong on 16/6/7.
 */

window.onload = function(){
    /*
    var testdiv = document.getElementById("testdiv");
    //testdiv.innerHTML = "<p> I inserted <em>this</em> content. </p>"
    var para = document.createElement("p");
    //var info = "nodeName:";
    //info += para.nodeName;
    //info += "nodeType:";
    //info += para.nodeType;
    //alert(info);
    testdiv.appendChild(para);

    var  text = document.createTextNode("Hello World!");
    para.appendChild(text);
    */

    var testdiv = document.getElementById("testdiv");
    var para = document.createElement("p");
    testdiv.appendChild(para);

    var text1 = document.createTextNode("This is ");
    para.appendChild(text1);

    var emphasis = document.createElement("em");
    para.appendChild(emphasis);

    var text2 = document.createTextNode("my ");
    emphasis.appendChild(text2);

    var  text3 = document.createTextNode("content.");
    para.appendChild(text3);


}

